<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : login.jsp
    Description : 로그인 페이지
    author Seung Won
    since 2012. 7. 19.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 7. 19.     Seung Won     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/co/mn/include/declare.jspf" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/jsp/co/mn/include/header.jspf" %>
<script type="text/javaScript" language="javascript">
<!--

$(document).ready(function() {
    /* Session Check */
    <% if (CsrUtil.isLogin(request, "mngSession")) { %>
    window.location.href = "/gn_100_02.do";
    <% } %>
    
    /* form validation check */
    onloadCharCheck();
    
    /* Form Submit */
    $("#rgstButn").bind("click", blcSubm);
    $("#pUpdButn").bind("click", pwMdfy);
    
    /* Enter Key Event */
    $("#mbrId").bind("keydown", eventEnter);
    $("#mbrPw").bind("keydown", eventEnter);
});

/*
 * mainForm Submit
 */
function blcSubm() {
    if (!validateForm($("#mainForm"))) {
        return;
    }
    
    $("#mainForm").attr('target', 'comIframe');
    $("#mainForm").attr('action','/gn_100_03.do').submit();
}

/*
 * 검색 Text EnterKey 처리
 */
function eventEnter() {
    if (event.key == 13) {
        blcSubm();
    }
}

/*
 * 비밀번호 변경
 */
function pwMdfy() {
    if (!validateForm($("#subForm"))) {
        return false;
    }
    
    if ($("#mdfyPw").val() != $("#mdfyPwConf").val()){
        alert("새 비밀번호가 서로 맞지 않습니다.");
        $("#mdfyPw").focus();
        return false;
    }
    
    $("#subForm").attr('target', 'comIframe');
    $("#subForm").attr('action','/gn_100_04.do').submit();
}

function callFitstPW(msg){
	$(".layOpen").click();
	$("#msgBox").css('visibility','visible');
}
//-->
</script>
</head>
<body>
<div id="wrap" class="logTop">
    <!-- accNav -->
    <div id="accNav"><a href="#container">skip to contents</a></div>
    <!-- /accNav -->
 
    <!-- header -->
    <div id="header">
        <h1><a href="#"><img src="/img/mng/common/hyundai.gif" alt="HYUNDAI &#124; NEW THINKING, NEW POSSIBLITIES" /></a></h1>
    </div>
    <!-- /header -->
 
    <!-- container -->
    <div id="container" class="logWrap">
        <div class="logBox">
            <h1><img src="/img/mng/common/h1_log_title.gif" alt="HMC 글로벌 CSR" /></h1>
            <p class="headMsg"><img src="/img/mng/common/head_log_msg.gif" alt="HMC 글로벌 CSR 웹사이트에 오신 것을 환영합니다." /></p>
            <form id="mainForm" name="mainForm" method="post" >
                <div class="login">
                    <h3><img src="/img/mng/common/h3_log_sub_title.gif" alt="LOGIN Administrative Service" /></h3>
                    <span class="userId">
                        <label for="mbrId">ID</label>
                        <input type="text" id="mbrId" name="mbrId" value="" title="ID" nullable="true" maxlength="10" minbyte="8" maxbyte="10" chartype="engnum" />
                    </span>
                    <span class="userPw">
                        <label for="frmPw">PASSWORD</label>
                        <input type="password" id="mbrPw" name="mbrPw" value="" title="비밀번호" nullable="true" maxlength="12" minbyte="8" maxbyte="12" chartype="password" />
                    </span>
                    <span class="userLog"><input type="image" onClick="return false;" src="/img/mng/btn/btn_login.gif" id="rgstButn" alt="Log In" title="Log In"></span>
                    <span class="changePw"><a href="#layer" class="layOpen">비밀번호 변경하기</a></span>
                </div>
            </form>
        </div>
    </div>
    <!-- /container -->
 
    <!-- layPop -->
    <div id="layer" class="layPop">
            <div class="layBg"></div>
            <div class="newPw">
                <p class="layClose"><button type="button"><img src="/img/mng/btn/btn_lay_close.gif" alt="close" /></button></p>
                <form name="subForm" id="subForm" method="post">
                    <h3><img src="/img/mng/common/head_pw_msg.gif" alt="비밀번호 변경하기" /></h3>
                   	<div id="msgBox" name="msgBox" style="visibility : hidden;text-align: center;padding-top: 10px">비밀번호 초기화를 받은 회원은 비밀번호 변경 후 사용이 가능합니다.</div>
                    <div class="layform" style="margin-top: 20px">
                        <span>
                            <label for="layId">ID</label>
                            <input type="text" id="mbrId" name="mbrId" value="" maxlength="10" nullable="true" title="ID" minbyte="8" maxbyte="10" chartype="engnum" />
                        </span>
                        <span>
                            <label for="currentPassword">기존 비밀번호</label>
                            <input type="password" id="mbrPw" name="mbrPw" value="" maxlength="10" nullable="true" title="기존 비밀번호" minbyte="8" maxbyte="12" chartype="password" />
                        </span>
                        <span>
                            <label for="layNewPw">새 비밀번호</label>
                            <input type="password" id="mdfyPw" name="mdfyPw" value="" charType="password" maxlength="10" nullable="true" title="새 비밀번호" minbyte="8" maxbyte="12" chartype="password" />
                        </span>
                        <span>
                            <label for="layReTypePw">새 비밀번호 확인</label>
                            <input type="password" id="mdfyPwConf" name="mdfyPwConf" value="" charType="password" maxlength="10" nullable="true" title="새 비밀번호 확인" minbyte="8" maxbyte="12" chartype="password" />
                        </span>
                    </div>
                    <span class="btnConfirm"><input type="submit" id="pUpdButn" title="확인" value="확인" /></span>
                </form>
            </div>
    </div>
    <!-- /layPop -->
 
    <!-- footer -->
    <%@ include file="/WEB-INF/jsp/co/mn/include/bottom.jsp" %>
    <!-- /footer -->
</div>
</body>
</html>
